package edu.sctu.practice.class02.yangyuran.test07;

/**
 * Created by Administrator on 2015/10/11.
 */
public class WuMingFen {
    public String theMa;
    public int quantity;
    public boolean likeSoup;

    public WuMingFen(String theMa, int quantity, boolean likeSoup) {
        super();
        this.theMa = theMa;
        this.quantity = quantity;
        this.likeSoup = likeSoup;
    }

    public WuMingFen(String theMa, int quantity) {
        super();
        this.theMa = theMa;
        this.quantity = quantity;
    }

    public WuMingFen() {
        this("酸辣", 2, true);
    }


    public void check() {

        if (likeSoup) {
            System.out.println(theMa + "面码" + "   " + quantity + "两" + "   有汤");
        } else {
            System.out.println(theMa + "面码" + "   " + quantity + "两" + "   没有汤");
        }
    }

    public static void main(String[] args) {

        WuMingFen f1 = new WuMingFen("牛肉", 3, true);
        f1.check();
        WuMingFen f2 = new WuMingFen("牛肉", 2);
        f2.check();
        WuMingFen f3 = new WuMingFen();
        f3.check();

    }
}